package io.union_pay.response;

import lombok.Data;

@Data
public class BaseResponse {

    private boolean succeed;

    private String errCode;

    private String errMsg;

    public void setErrCode(String errCode) {
        this.errCode = errCode;
        if (errCode.equals("0000") || errCode.equals("SUCCESS")) {
            this.succeed = true;
        } else {
            this.succeed = false;
        }
    }

    public void setErrInfo(String errInfo) {
        this.errMsg = errInfo;
    }

}
